package overall.manager 
{
	import starling.display.Sprite;

	

	public class LayerManager
	{
		public function LayerManager()
		{
		}
		
		
		
		
		static private var _instance:LayerManager;
		static public function get instance():LayerManager{
			_instance=_instance||new LayerManager;
			return _instance;
		}
		
		
		private var _underLayer:Sprite;
		private var _bgLayer:Sprite;
		private var _gameLayer:Sprite;
		private var _plunLayer:Sprite;
		private var _magicLayer:Sprite;
		private var _frameLayer:Sprite;
		
		
		private var _stageWidth:int;
		private var _stageHeight:int;
		public function start(stg:Sprite,w:int=900,h:int=600):void
		{
			_underLayer=new Sprite;
			_bgLayer=new Sprite;
			_gameLayer=new Sprite;
			_plunLayer=new Sprite;
			_magicLayer=new Sprite
			_frameLayer=new Sprite;
			
			stg.addChild(_underLayer);
			stg.addChild(_bgLayer);
			stg.addChild(_gameLayer);
			stg.addChild(_plunLayer);
			stg.addChild(_magicLayer);
			stg.addChild(_frameLayer);
			
			_stageWidth=w;
			_stageHeight=h;
		}
		
		
		
		public function get underLayer():Sprite
		{
			return _underLayer;
		}
		public function get bgLayer():Sprite
		{
			return _bgLayer;
		}
		public function get gameLayer():Sprite
		{
			return _gameLayer;
		}
		public function get plunLayer():Sprite
		{
			return _plunLayer;
		}
		public function get magicLayer():Sprite
		{
			return _magicLayer;
		}
		public function get frameLayer():Sprite
		{
			return _frameLayer;
		}
		
		
		public function get stageWidth():int
		{
			return _stageWidth;
		}
		public function get stageHeight():int
		{
			return _stageHeight;
		}
		
		
	}
}